﻿namespace Jinjia.Approve.Entity.Entity
{
    ///<summary>
    ///佣金结算表-中台PO采购单
    ///表commission_account_tbl的实体类
    ///</summary>
    public class commission_account_tbl
    {
        /// <summary>
        /// id
        /// </summary>
        public int id { get; set; }

        /// <summary>
        /// 采购单号
        /// </summary>
        public string purchase_no { get; set; }

        /// <summary>
        /// 我司主体
        /// </summary>
        public string us_company { get; set; }

        /// <summary>
        /// 采购单状态 1编辑中，-1已取消，审核中2，审核通过（待推送）3，审核驳回-2 推送失败-3，推送成功（待收货）4，部分到货5，已到货（待结算）6,部分到货完成（待结算）7 付款待财审8，付款审核驳回9，已完成10
        /// </summary>
        public int order_status { get; set; }

        /// <summary>
        /// 先货后款1 先款后货2
        /// </summary>
        public int pay_after { get; set; }

        /// <summary>
        /// 货款发票状态1未提交 2待审核 3已驳回 4部分归档 5已归档
        /// </summary>
        public int invoice_status { get; set; }

        /// <summary>
        /// 重量
        /// </summary>
        public decimal weight { get; set; }

        /// <summary>
        /// 件数
        /// </summary>
        public decimal num { get; set; }

        /// <summary>
        /// 币种
        /// </summary>
        public string currency_code { get; set; }

        /// <summary>
        /// 采购总金额（原币）
        /// </summary>
        public decimal total_amount { get; set; }

        /// <summary>
        /// 采购总金额（rmb）
        /// </summary>
        public decimal total_amount_rmb { get; set; }

        /// <summary>
        /// 总佣金
        /// </summary>
        public decimal total_commission { get; set; }

        /// <summary>
        /// 总佣金（RMB）
        /// </summary>
        public decimal total_commission_rmb { get; set; }

        /// <summary>
        /// 采购单总数
        /// </summary>
        public int total_count { get; set; }

        /// <summary>
        /// 货款支付状态（已付款：Y,未付款：N, 部分付款：P）
        /// </summary>
        public string pay_goods_status { get; set; }

        /// <summary>
        /// 货款应付日期
        /// </summary>
        public string expect_goods_pay_date { get; set; }

        /// <summary>
        /// Credit金额
        /// </summary>
        public decimal credit_amount { get; set; }

        /// <summary>
        /// 货款已付金额
        /// </summary>
        public decimal goods_payed_amount { get; set; }

        /// <summary>
        /// 当前钉钉申请金额
        /// </summary>
        public decimal apply_payment_amout { get; set; }

        /// <summary>
        /// 货款支付日期
        /// </summary>
        public string goods_payed_date { get; set; }

        /// <summary>
        /// 货款未支付金额
        /// </summary>
        public decimal goods_unpayed_amount { get; set; }

        /// <summary>
        /// 首款金额
        /// </summary>
        public decimal first_payed_amount { get; set; }

        /// <summary>
        /// 尾款金额
        /// </summary>
        public decimal last_payed_amount { get; set; }

        /// <summary>
        /// 首款支付日期
        /// </summary>
        public string first_payed_date { get; set; }

        /// <summary>
        /// 尾款支付日期
        /// </summary>
        public string last_payed_date { get; set; }

        /// <summary>
        /// 佣金支付状态（已支付：Y,未支付：N）
        /// </summary>
        public string is_pay_commission { get; set; }

        /// <summary>
        /// 账期
        /// </summary>
        public string payment_days { get; set; }

        /// <summary>
        /// invoice日期
        /// </summary>
        public string invoice_date { get; set; }

        /// <summary>
        /// 佣金应付月份
        /// </summary>
        public string commission_expect_month { get; set; }

        /// <summary>
        /// 佣金支付日期
        /// </summary>
        public string commission_pay_date { get; set; }

        /// <summary>
        /// 是否有返点
        /// </summary>
        public string is_rebate { get; set; }

        /// <summary>
        /// 返点比例
        /// </summary>
        public decimal rebate_rate { get; set; }

        /// <summary>
        /// 返点金额
        /// </summary>
        public decimal rebate_amount { get; set; }

        /// <summary>
        /// 返点应收日期
        /// </summary>
        public string expect_rebate_date { get; set; }

        /// <summary>
        /// 返点是否收款
        /// </summary>
        public string is_rebate_received { get; set; }

        /// <summary>
        /// 返点实收日期
        /// </summary>
        public string actual_rebate_date { get; set; }

        /// <summary>
        /// 提单号
        /// </summary>
        public string lading_bill_no { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string remark { get; set; }

        /// <summary>
        /// 佣金比例
        /// </summary>
        public decimal commission_rate { get; set; }

        /// <summary>
        /// 供应商no
        /// </summary>
        public string provider_no { get; set; }

        /// <summary>
        /// 仓库
        /// </summary>
        public string warehouse_no { get; set; }

        /// <summary>
        /// 订单类型（0：总代采购订单，1：非总代采购单）
        /// </summary>
        public string order_type { get; set; }

        /// <summary>
        /// 是否按分摊比例（N:否，Y:是）
        /// </summary>
        public string is_share_rate { get; set; }

        /// <summary>
        /// 是否按分摊金额（N:否，Y:是）
        /// </summary>
        public string is_share_amount { get; set; }

        /// <summary>
        /// 护肤，彩妆，其他
        /// </summary>
        public string cg_type { get; set; }

        /// <summary>
        /// 1是 0不是
        /// </summary>
        public sbyte is_first_apply { get; set; }

        /// <summary>
        /// 分摊金额（rate时为比例，amount时为金额）
        /// </summary>
        public decimal share_amount { get; set; }

        /// <summary>
        /// 杂费分摊币种
        /// </summary>
        public string share_currency_code { get; set; }

        /// <summary>
        /// 杂费分摊汇率
        /// </summary>
        public decimal share_exchange_rate { get; set; }

        /// <summary>
        /// 分摊比例
        /// </summary>
        public decimal share_rate { get; set; }

        /// <summary>
        /// 预计到达时间
        /// </summary>
        public System.DateTime expected_ariv_time { get; set; }

        /// <summary>
        /// 货运类型
        /// </summary>
        public string freight_type { get; set; }

        /// <summary>
        /// 汇率
        /// </summary>
        public decimal exchange_rate { get; set; }

        /// <summary>
        /// 附件（可能多个）
        /// </summary>
        public string upload_url { get; set; }

        /// <summary>
        /// 商品明细链接
        /// </summary>
        public string goods_detail_url { get; set; }

        /// <summary>
        /// 入库是否匹配 1匹配（少了或正好） 2不匹配（入库多了）
        /// </summary>
        public int stockin_match { get; set; }

        /// <summary>
        /// createUserId
        /// </summary>
        public int create_user_id { get; set; }

        /// <summary>
        /// createTime
        /// </summary>
        public System.DateTime create_time { get; set; }

        /// <summary>
        /// updateUserId
        /// </summary>
        public int update_user_id { get; set; }

        /// <summary>
        /// updateTime
        /// </summary>
        public System.DateTime update_time { get; set; }

        /// <summary>
        /// 0-未指定 1-采购部 2-品牌部 3-战略品牌部
        /// </summary>
        public sbyte department_code { get; set; }

        /// <summary>
        /// 旺店通采购单号
        /// </summary>
        public string wdt_purchase_no { get; set; }

        /// <summary>
        /// 0. 初始 1.预估完成 2. 实际完成 3.强制完成
        /// </summary>
        public sbyte cost_status { get; set; }

        /// <summary>
        /// 用于自定义标签 0.未标记 1. 标记为预分摊完成2.分摊完成3.强制完成
        /// </summary>
        public sbyte tag { get; set; }

        /// <summary>
        /// 旺店通状态：10 已取消,20 编辑中,30 待审核,35 待财审,40 已审核,43 待推送,45 推送失败,48 待收货,50 部分到货,60已到货,70 待结算,80 部分结算,90 已完成
        /// </summary>
        public int wdt_order_status { get; set; }

        /// <summary>
        /// 中台订单状态：1-草稿;2-一级审核中;3-待入库;4-部分入库;5-待结算;6-部分结算;7-全部结算;8-已完成;9-已作废\r\n(code_type : purchase_order_status_zt)
        /// </summary>
        public int zt_order_status { get; set; }

        /// <summary>
        /// 预付金额
        /// </summary>
        public decimal goods_pre_pay_amount { get; set; }

        /// <summary>
        /// 已申请预付金额
        /// </summary>
        public decimal applied_goods_pre_pay_amount { get; set; }

        /// <summary>
        /// 采购时间
        /// </summary>
        public System.DateTime purchase_time { get; set; }

        /// <summary>
        /// 采购员id
        /// </summary>
        public int purchase_user_id { get; set; }

        /// <summary>
        /// 公司名
        /// </summary>
        public string company_name { get; set; }

        /// <summary>
        /// 公司组织编码
        /// </summary>
        public string company_nc_org_no { get; set; }

        /// <summary>
        /// 公司组织表id
        /// </summary>
        public int company_nc_org_id { get; set; }

        /// <summary>
        /// 标志
        /// </summary>
        public string mark { get; set; }

        /// <summary>
        /// 采购员名称
        /// </summary>
        public string purchase_user_name { get; set; }

        /// <summary>
        /// 预计到达时间
        /// </summary>
        public System.DateTime expected_arrive_time { get; set; }

        /// <summary>
        /// 推送状态(0-待推送，10-取消失败，20-已取消，30-推送失败，40-已推送，50-回传异常，60-部分回传，70-已完成)
        /// </summary>
        public int push_status { get; set; }

        /// <summary>
        /// 删除标识
        /// </summary>
        public int deleted { get; set; }

        /// <summary>
        /// 源单类型 0:旺店通建单;1:内部交易建单;2:中台建单;3:寄售;
        /// </summary>
        public int src_order_type { get; set; }

        /// <summary>
        /// 源单号(拆分)
        /// </summary>
        public string split_src_order_no { get; set; }

        /// <summary>
        /// Oak订单状态(0-草稿，10-审核中，20-已审核，30-已完成，40-已作废)
        /// </summary>
        public int oak_order_status { get; set; }

        /// <summary>
        /// 审批通过时间
        /// </summary>
        public System.DateTime approved_time { get; set; }

        /// <summary>
        /// 推送失败原因
        /// </summary>
        public string push_message { get; set; }

        /// <summary>
        /// 审批流状态 单据通用状态字段名 0.草稿 10.审批中 20.已完成  100.作废
        /// </summary>
        public int approval_status { get; set; }
    }
}